package cn.com.nes.site.service.system.company;

import cn.com.nes.mybatis.agent.system.entity.Department;
import cn.com.nes.site.entity.vo.system.DepartmentDeleteVO;
import cn.com.nes.site.entity.vo.system.DepartmentSaveVO;
import cn.com.nes.site.entity.vo.system.DepartmentTreeNodeVO;
import cn.com.nes.site.service.system.company.dto.CompanyTreeNodeDTO;
import cn.com.nes.site.service.system.company.dto.DepartmentTreeNodeDTO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;


public interface DepartmentService extends IService<Department> {

    Department saveDepartment(DepartmentSaveVO vo) throws Exception;

    void deleteDepartment(DepartmentDeleteVO vo) throws Exception;

    List<DepartmentTreeNodeDTO> getDepartmentTreeNode(DepartmentTreeNodeVO vo) throws Exception;

    List<CompanyTreeNodeDTO> getCompanyTreeNodeList(List<String> companyIds) throws Exception;

    Department getDepartmentForCompany(String companyId, String departmentName) throws Exception;

    Department getDepartment(String departmentId) throws Exception;

    List<Department> getDepartment(List<String> departmentId) throws Exception;

    List<Department> hasNextLevel(String departmentId) throws Exception;

    String getLastDepartmentId(String companyId) throws Exception;

    Boolean departmentHasUsers(String departmentId) throws Exception;

}
